import { WebView } from "@tarojs/components";
import { useDidShow } from "@tarojs/taro";
import { useState } from "react";
import { sg } from "@utils/index";
const WebViewPage = () => {
  const [url, setUrl] = useState("");
  useDidShow(() => {
    const url: string = sg.getValue("webviewUrl") as string;
    if (url) {
      setUrl(url);
    }
  });
  return <WebView src={url} />;
};

export default WebViewPage;
